Welcome to betterCategories!


Disclaimer: Please Read First!

This mod may spoil your entire site. It may irreparably damage every file in your server, cause your server and personal computers to explode, resulting in severe physical damage and ample loss of property to you and your loved ones. You agree to use it at your own risk, and take full responsibility for any and all consequences. Absolutely no one should attempt to install these files in their server without having done a complete back up of all of their server assets. Have you backed up? If not:

DO NOT PROCEED: BACK UP IMMEDIATELY!

What does betterCategories do?

betterCategories is a modification ('mod') to the default 'Categories' sidebox that ships with Zen Cart. It is intended as a replacement for it.

The betterCategories sidebox is identical in function to the default sidebox - you won't get any extra functionality. It is, however, different in appearance.

With betterCategories, your 'Categories' sidebox will:

  • show an image (pointer, folder, disclosure triangle) next to the category name
  • specify borders/lines between each category name
  • make each category name function like a rollover button, with the appropriate mouseOver effects

Right after installation, your new 'Categories' sidebox will look something like this - the category 'Study Books' below has the cursor over it, so the background is a different colour:

Of course, you can very easily customise your own sidebox - more details below - so that your betterCategories sidebox might end up looking quite different to the one above!

How do I install it?

First of all, in case you missed the warning above:

BACK UP STRAIGHT AWAY!

Never make any modifications to your site without first having a full back up that you can use immediately, if things do not go as expected!

Now, for starters: which TEMPLATE are you using in Zen Cart? Do you know?

Zen Cart ships with 2 templates by default ('Classic' and 'Blue Strip'), and there are many more templates available on the internet. In order to install betterCategories, you need to know which template you are using, and the name of the 'Template Directory'.

To find out:

  1. Go into your Admin Panel
  2. Select Tools -> Template Selection

In that page, you will see a list of which templates are being used for each different language in your site. Most people only use 1 template, regardless of how many languages they support, so you should see a table with just 1 template being listed.

I this table, you should see the 'Template Name', and next to that, the 'Template Directory'. That is the name of the folder in your server, where all your template files are. If you are using the template 'Classic', for example, your template directory will be 'classic'. If you are using 'Blue Strip', your template directory will be called 'blue_strip'. Remember the name of your Template Directory!

Now, using the same program you used to upload Zen Cart to your server, you will need to upload the betterCategories files. There are only a few:

  1. upload 'stylesheet_betterCategories.css' to:
    ../includes/templates/TEMPLATE_DIRECTORY/css/
  2. upload 'cat_no_sub.gif', 'cat_pointer_right.gif' and 'cat_pointer_down.gif' to:
    ../includes/templates/TEMPLATE_DIRECTORY/images/
  3. upload 'tpl_categories.php' to:
    ../includes/templates/TEMPLATE_DIRECTORY/sideboxes/

Where you see 'TEMPLATE_DIRECTORY', you should use the name of the directory of your current template - which you have already discovered, by following 'a' and 'b' above!

If any of these directories do not exist, you should create them. For instance: if inside your 'TEMPLATE_DIRECTORY' folder you do not have another folder called 'css', then make one!

These files should not be replacing any existing files in your site. If any of the files already exist in those directories, by uploading the betterCategories files you will overwrite them!

DO NOT OVERWRITE ANY FILES IN YOUR SERVER,
UNLESS YOU ALREADY HAVE A BACK UP!

Last of all, once all the files are in place, you will need to change some of the settings in your Admin Panel - because the settings you had for your old categories sidebox will not suit the new one:

  1. go into your Admin Panel
  2. go into Configuration -> Layout Settings
  3. set 'Categories Separator between links Status' to '0' (false)
  4. set 'Categories Separator between the Category Name and Sub Categories' to NOTHING - ie, delete anything that may be there, and leave it empty
  5. if you want your sub-categories to indent:
    set 'Categories SubCategories Indent' to '  &nbsp' (without the quotes). This will add a triple space for each sub-category level

The betterCategories sidebox should now be working!

How do I customise it?

You can easily customise much of the way your betterCategories sidebox looks:

  • To change the colour of the mouseOver effect, the padding around category names, the colour and thickness of the dividing borders - and even specify more specific effects for 'active' and 'visited' links - you just have to edit the 'stylesheet_betterCategories.css' file. This is a simple CSS file, and you can use any of the typical CSS attributes and tricks that apply to DIV elements.
  • To change the colour of the TEXT, as well as font, font size, font style, etc., look at the very end of the 'stylesheet.css' file, that is part of your default template. You can edit these attributes in exactly the same way you would edit the same attributes if the original Zen Cart categories box was still installed.
  • To change the appearance of the pointers - you might want, for instance, to have a 'closed folder', instead of a right-pointer, and an 'open folder', instead of a down-pointer - all you have to do is replace the 3 image files! Some alternative images are available in the 'optional' folder, inlcuded with the betterCategories package.
  • If you do not want to have 'pointer' images at all, simply replace them with single-pixel, transparent GIF images, with the same name!

Give Feedback!

If you have any problems with betterCategories, please report them in the Zen Cart Forums! While betterCategories is a very simple modification to the standard Zen Cart categories sidebox, it might still be incompatible with some other 3rd-party mods out there - and unless these incompatibilities are reported, they will never be fixed!

If you are using betterCategories and your site looks absolutely fantastic, make sure that you also drop a message into the Zen Cart Forum! Positive feedback is always welcome!

Lastly, if you believe betterCategories is so amazing, that you just HAVE to pay money for it, please consider making a donation to the Zen Cart project!


©2005, Igor de Oliveira Couto | check for updates at the Zen Cart website!